package com.nyc.boot;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Conditional;
import org.springframework.context.annotation.Configuration;

/**
 * condition 注解
 * @author niuyicong
 * @date 2025/8/25  23:36:30
 * @description
 */
@Configuration
public class Demo01Config {
    @Conditional(value = {ConditionOnClass.class})
    @Bean
    public DeptService deptService(){
        return new DeptService();
    }
}
